package cn.ydxiaoshuai.reptile.aistuido;

import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;

/**
 * Description 示例
 * ProjectName worktools
 * Created by 小帅丶 on 2023-01-04 14:44.
 * Version 1.0
 */

public class AIStudioSample {

    public static void main(String[] args) throws Exception {
        String dataJson = "{\"badgeList\":[{\"badgeDesc\":\"<div style=\\\"color: #000; font-size: 14px; margin-bottom: 4px\\\">GPU训练总时长达到500小时，开始你的炼丹之旅吧！</div>\\r\\n<div style=\\\"color: #ea2e2e\\\">战力+80</div>\",\"badgeName\":\"训练狂人\",\"gain\":false,\"id\":1,\"imgUrl\":\"https://ai.bdstatic.com/file/9C1AB853529349A39D5DC3C443172BCB\",\"sampleUrl\":\"https://ai.bdstatic.com/file/89FF97A26F7443A9B305B7F5BDD5B666\",\"showType\":0},{\"badgeDesc\":\"<div style=\\\"color: #000; font-size: 14px; margin-bottom: 4px\\\">公开项目被30个人fork，来分享你的项目吧！</div>\\r\\n<div style=\\\"color: #ea2e2e\\\">战力+100</div>\",\"badgeName\":\"项目达人\",\"gain\":false,\"id\":2,\"imgUrl\":\"https://ai.bdstatic.com/file/0111F673FE2D46F4BEEC3767825D835A\",\"sampleUrl\":\"https://ai.bdstatic.com/file/55F2B2B29D124700AF920A032066AB70\",\"showType\":0},{\"badgeDesc\":\"<div style=\\\"color: #000; font-size: 14px; margin-bottom: 4px\\\">公开数据集被30个人引用，一起来玩转数据集！ </div>\\r\\n<div style=\\\"color: #ea2e2e\\\">战力+100</div>\",\"badgeName\":\"数据集专家\",\"gain\":false,\"id\":3,\"imgUrl\":\"https://ai.bdstatic.com/file/82D9C96AE970458098865C3A917F9432\",\"sampleUrl\":\"https://ai.bdstatic.com/file/FA23DC7130EC44D3A7D961E4D382FB71\",\"showType\":0},{\"badgeDesc\":\"<div style=\\\"color: #000; font-size: 14px; margin-bottom: 4px\\\">单个公开课程学习10次，加入课程立即安排！</div>\\r\\n<div style=\\\"color: #ea2e2e\\\">战力+20</div>\",\"badgeName\":\"AI学习新星\",\"gain\":false,\"id\":4,\"imgUrl\":\"https://ai.bdstatic.com/file/F0E691B9BC704C31B4E3324F5B631F7B\",\"sampleUrl\":\"https://ai.bdstatic.com/file/674EDA59C724491F8B5D99ECD3FE17DA\",\"showType\":0},{\"badgeDesc\":\"<div style=\\\"color: #000; font-size: 14px; margin-bottom: 4px\\\">累计20次评论，一起来分享交流吧</div>\\r\\n<div style=\\\"color: #ea2e2e\\\">战力+50</div>\",\"badgeName\":\"评论家\",\"gain\":false,\"id\":9,\"imgUrl\":\"https://ai.bdstatic.com/file/A588D054464948D18853DBD33B37F338\",\"sampleUrl\":\"https://ai.bdstatic.com/file/838619634694414F87E4B64AC5490540\",\"showType\":0},{\"badgeDesc\":\"<div style=\\\"color: #000; font-size: 14px; margin-bottom: 4px\\\">获得20名粉丝，我为AI Studio 小红人带盐！</div>\\r\\n<div style=\\\"color: #ea2e2e\\\">战力+100</div>\",\"badgeName\":\"小红人\",\"gain\":false,\"id\":10,\"imgUrl\":\"https://ai.bdstatic.com/file/D23D78AF4AFC487C9FB255CD1ED97145\",\"sampleUrl\":\"https://ai.bdstatic.com/file/E101ECEC47794A04973C159E52EAB854\",\"showType\":0},{\"badgeDesc\":\"<div style=`color: #000; font-size: 14px; margin-bottom: 4px`>关注20人以上，让我们一起互关学习交流吧！</div>\\n<div style=`color: #ea2e2e`>战力+50</div>\",\"badgeName\":\"社交小能手\",\"gain\":false,\"id\":17,\"imgUrl\":\"https://ai-studio-static-online.bj.bcebos.com/badges/073g.png\",\"sampleUrl\":\"https://ai-studio-static-online.bj.bcebos.com/badges/073l.png\",\"showType\":0}],\"classCount\":19,\"course\":{\"applyTime\":1591457978000,\"beginDate\":1591632001000,\"copyState\":11,\"endDate\":1704038398000,\"fee\":\"0\",\"free\":0,\"groupAbs\":\"百度NeurIPS全球顶会冠军团队授课，7日全直播教学，5次实战打卡，带你从零实践强化学习。\",\"groupCapacity\":0,\"groupId\":1335,\"groupKeywords\":\"强化学习,深度学习,RL,PARL\",\"groupName\":\"强化学习7日打卡营-世界冠军带你从零实践\",\"groupPortrait\":\"https://ai-studio-static-online.cdn.bcebos.com/ed6a931dedb64b279e68e19843e9b91d5e4f43a26b734174911b00d2c01df4d7\",\"groupSize\":13190,\"groupType\":2,\"id\":1335,\"joinType\":1,\"memberId\":0,\"onlineTime\":1652774723000,\"orgId\":445,\"orgName\":\"飞桨\",\"publicState\":2,\"qrCode\":\"\",\"rejectReason\":\"\",\"saveType\":1,\"state\":1,\"statusCode\":1,\"userId\":545447},\"dataset\":{\"authorName\":\"\",\"collect\":false,\"collectCount\":9,\"commentCount\":0,\"createTime\":\"2018-06-29 13:32:15\",\"datasetAbs\":\"手写数据集\",\"datasetId\":121,\"datasetName\":\"手写数字\",\"datasetType\":2,\"datasetWeight\":174,\"downloadCount\":0,\"fileAbsList\":[],\"fileIds\":[],\"fileList\":[],\"matchId\":0,\"nickname\":\"\",\"portrait\":\"\",\"protocolId\":1,\"rankDate\":0,\"selectType\":0,\"selfDataset\":true,\"statusCode\":1,\"tags\":[],\"topicTags\":[],\"updateTime\":\"2018-06-29\",\"useCount\":52,\"userId\":275,\"userName\":\"\",\"viewCount\":0},\"datasetCount\":88,\"exp\":1964,\"followeeCount\":21,\"followerCount\":43,\"forkCount\":179,\"joinDate\":\"2018年06月29日\",\"joinDays\":1649,\"level\":3,\"match\":{\"btnInviteStatus\":2,\"btnInviteText\":\"\",\"btnJoinStatus\":2,\"btnJoinText\":\"\",\"btnSignupStatus\":0,\"btnSignupText\":\"\",\"btnSubmitText1\":\"\",\"btnSubmitText2\":\"\",\"createTime\":\"2022-04-19 20:20:55\",\"enBtnSubmitText1\":\"\",\"enBtnSubmitText2\":\"\",\"enSubmitText1\":\"\",\"enSubmitText2\":\"\",\"endTime\":\"2023/12/31\",\"forumUrl\":\"https://aistudio.baidu.com/paddle/forum/topic/list?boardId=241\",\"id\":52,\"logo\":\"https://ai-studio-static-online.cdn.bcebos.com//match/30b2cbaa-f1b1-43cc-9763-f4ebf05bcca0.png\",\"matchAbs\":\"提供约50万次点击数据，请预测用户的点击行为是否为正常点击，还是作弊行为。\",\"matchContent\":[],\"matchKey\":\"fraud\",\"matchName\":\"飞桨学习赛：MarTech Challenge 点击反欺诈预测\",\"previewCode\":\"\",\"processCode\":0,\"processId\":1944,\"processList\":[],\"processName\":\"初赛\",\"processText\":\"\",\"projectId\":0,\"reward\":\"荣誉证书+GPU算力\",\"routine\":1,\"signupCount\":3411,\"signupLink\":\"\",\"signupType\":0,\"sponsorLogo\":\"https://ai-studio-match.bj.bcebos.com/img/baiduLogo.png\",\"startTime\":\"2020/09/01\",\"statusCode\":1,\"submitText1\":\"\",\"submitText2\":\"\",\"tags\":\"反欺诈预测\",\"teamUserLimit\":1,\"tokenObtain\":0,\"tokenReason\":\"未报名\",\"updateTime\":\"2023-01-03 16:37:05\",\"userSignup\":0},\"matchCount\":7,\"nickname\":\"小帅丶\",\"portrait\":\"https://himg.bdimg.com/sys/portrait/item/05de1b07\",\"project\":{\"baseInfoScore\":0,\"channel\":0,\"collect\":false,\"collectCount\":18,\"commentCount\":18,\"createTime\":\"2020-10-23 11:19:41\",\"createTimeStamp\":1603423181000,\"deviceType\":0,\"fork\":false,\"forkCount\":113,\"graphRunningSubmitId\":0,\"ideType\":1,\"initStatus\":1,\"interventionScore\":0,\"keywords\":\"1024、程序员节、秃头鸭、小程序、PaddleHub、百度大脑、图像清晰度增强、趣味小程序\",\"nickname\":\"\",\"openCourseMapping\":0,\"paddleVersion\":\"\",\"projectAbs\":\"一款基于飞桨PaddleHub预训练模型和百度大脑图像清晰度增强技术的趣味小程序\",\"projectDataset\":[],\"projectEnvironment\":2,\"projectFramework\":17,\"projectId\":1145381,\"projectName\":\"1024程序员节——『秃头鸭』小程序给全体成员拜节了（内含抽奖~）\",\"projectState\":300400,\"projectType\":3,\"projectWeight\":393,\"publicTimeScore\":0,\"pythonVersion\":\"\",\"qualityScore\":0,\"resourceAlloc\":0,\"running\":false,\"selected\":true,\"selfProject\":true,\"sharedModelServing\":false,\"statusCode\":1,\"tags\":[11,21],\"templateId\":0,\"updateTime\":\"2020-10-23 19:07:14\",\"userGradeScore\":0,\"userId\":275,\"userName\":\"\",\"viewCount\":0},\"rank\":374,\"userList\":[{\"exp\":12136,\"level\":4,\"nickname\":\"炼丹师233\",\"portrait\":\"https://ai-studio-static-online.cdn.bcebos.com/10c3e5d3912e44288dda06f391eca85cd1fc41bf727844ccb37e1cb2b1f58a7e\",\"userId\":330406,\"userName\":\"\"},{\"exp\":6496,\"level\":4,\"nickname\":\"leigangblog\",\"portrait\":\"https://ai-studio-static-online.cdn.bcebos.com/11434221ad99474599264219fbae007150862579463043198a69674451751cbb\",\"userId\":118783,\"userName\":\"lollg431\"},{\"exp\":4326,\"level\":3,\"nickname\":\"Y_kira\",\"portrait\":\"https://ai-studio-static-online.cdn.bcebos.com/461d6022e7be4f31bb5f04697c6b8d9c966c5dc95ff1485cbb58b54fc1b27fa1\",\"userId\":262940,\"userName\":\"Loserecall丶\"},{\"exp\":4060,\"level\":3,\"nickname\":\"王荣胜\",\"portrait\":\"https://ai-studio-static-online.cdn.bcebos.com/6e3d09b69d714ebea8eeb5028579dc2fe3ebef90f1054546bc9a2c1b8397ad64\",\"userId\":98087,\"userName\":\"z88077077\"},{\"exp\":2626,\"level\":3,\"nickname\":\"90小叔\",\"portrait\":\"https://ai-studio-static-online.cdn.bcebos.com/61789e16a827450c8fb901d0199b3e64e4e40a7a0b314fe0bbd1b165ca20d076\",\"userId\":1697,\"userName\":\"汽车199101\"},{\"exp\":2307,\"level\":3,\"nickname\":\"学习委员\",\"portrait\":\"https://ai-studio-static-online.cdn.bcebos.com/d09fb8b77cca4c32bc4d54a358eb1e121c3b90fb0ce74cdbbc26a9703b058920\",\"userId\":31756,\"userName\":\"Wwsd3d\"}],\"viewCount\":3546}";
        AIStudioYearReportBean bean = JSON.parseObject(dataJson, AIStudioYearReportBean.class);
        bean.setDataDate(DateUtil.today());
        AIStudioYearReport.generalYearReportPoster(bean,"/posterresult.png");
    }
}
